{extend name="public:layout" /}
{block name="title"}添加seo{/block}
{block name="head"}
{:widget('common/Form/icheckRes')}
{:widget('common/Form/validRes')}
{:widget('common/Form/dateRes')}
<link href="/public/plugins/chosen/chosen.css" rel="stylesheet">
<script src="/public/plugins/chosen/chosen.jquery.js"></script>
<style>
    .tab-pane {
        padding-top: 10px;
    }
</style>
{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> seo列表</a></li>
                <li class="active">添加seo</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="alert alert-danger">
                首页,列表页,频道页,内容页程序已经自动处理，请勿重复添加
            </div>
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">地址</label>
                    <div class="col-sm-5">
                        <input type="url" name="url" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">最后更新时间</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control laydate-icon layer-date" style="width:150px;"
                               name="lastmod" onclick="laydate();" value="{$query.bdate}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">更新频率</label>
                    <div class="col-sm-10">
                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="always" name="changefreq" style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            总是更新
                        </label>
                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="hourly" name="changefreq"  style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            每小时
                        </label>
                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="daily" name="changefreq" checked style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            每天
                        </label>
                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="weekly" name="changefreq"  style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            每星期
                        </label>

                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="monthly" name="changefreq"  style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            每月
                        </label>

                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="yearly" name="changefreq"  style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            每年
                        </label>

                        <label class="checkbox-inline i-checks">
                            <div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="never" name="changefreq"  style="position: absolute; opacity: 0;">
                                <ins class="iRaido-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                            </div>
                            从不
                        </label>
                        <span class="help-block m-b-none">请认真选择，如果搜索引擎发现不符有可能不再收录</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">权重</label>
                    <div class="col-sm-5">
                        <input type="text" min="0" max="1" name="priority" class="form-control">
                        <span class="help-block m-b-none">请填写0~1的数值，1权重最大</span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary"
                                onclick="ajaxSubForm();" type="submit">
                            保存内容
                        </button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        $('.chosen-select').chosen();
        iCheck();
        $("input[name='cat_type']").on('ifChecked', function (event) {
            setTpl();
        });
        $("input[name='is_batch']").on('ifChanged', function (event) {
            if ($(this).prop('checked')) {
                $('.two').show();
                $('.one').hide();
            } else {
                $('.two').hide();
                $('.one').show();
            }
        });
    })
    /**
     * 设置模版
     */
    function setTpl() {
        var catTpl = $('input[name="cat_type"]:checked ').data('tpl');
        $("input[name='cat_tpl']").val(catTpl);
    }
</script>
{/block}